home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine CD 1995 / Archive Magazine CD 1995.iso / discs / prog_disc / volume_1 / issue_04 / dump_progs / rc_source < prev   
Encoding:
Text File  |  1987-10-31  |  5.0 KB  |  7 lines

  1.  
  2. ÃP>ô > RCsourceFN      : Assembler FN to generate MiniDumpRC.
  3. ÃZ"Ý ¤assemble_MiniDumpAC(start%)
  4. Ãd'ô FN Version 2.10   : 26th Oct 1987
  5. Ãn)ô Copyright         : ABACUS TRAINING
  6. Ãx:
  7. Ãŵ:
  8. Ã…Fê sp,write,top,left,right,bottom,xorigin,yorigin,xconvert,yconvert
  9. ÄAê blockend,osbyte0,osbyte1,x,y,colour,dot,line,horizpsn,pixel
  10. à1ê points,printcode,newline,newstrike,newpixel
  11. ê.ê margin,threshold,xstep,finish,pass%,end%
  12. ôê Ŷ
  13. þ"î Ŷ ï26,12:ö:ñ " at line ";fi:ú
  14. ÃÈ:
  15. ÃÒ:
  16. ÃÜ:
  17. Ãæ6ô Registers transferred from R0, R1 & R2 on entry.
  18. Ãð9margin     =  2  :ô Left margin in tenths of an inch.
  19. Ãú5threshold  = 12  :ô The logical colour threshold.
  20. ÄJxstep      = 10  :ô Horiz. step size calculated from the printer mode.
  21. Ä:
  22. Äô Use the BASIC stack.
  23. Ä"&sp         = 13  :ô Stack pointer.
  24. Ä,:
  25. Ä6%ô Register used with "OS_WriteC".
  26. Ä@@write      =  0  :ô Contains code to be sent to the printer.
  27. ÄJ:
  28. ÄT0ô Registers used with "OS_ReadVduVariables".
  29. Ä^/top        =  3  :ô Top of graphics window.
  30. Äh4left       =  4  :ô Left end of graphics window.
  31. Är5right      =  5  :ô Right end of graphics window.
  32. Ä|2bottom     =  6  :ô Bottom of graphics window.
  33. Äŷ6xorigin    =  7  :ô Origin of screen co-ordinates.
  34. Ä‘6yorigin    =  8  :ô Origin of screen co-ordinates.
  35. ÄŒ.xconvert   =  9  :ô Horizontal resolution.
  36. Ĥ,yconvert   = 10  :ô Vertical resolution.
  37. Ä®<blockend   = 11  :ô End of parameter block, value is -1.
  38. ĸ:
  39. ÄÂ$ô Registers used with "OS_Byte".
  40. ÄÌAosbyte0    =  0  :ô Contains value 3 for *FX 3,10 or *FX 3,0.
  41. ÄÖ/osbyte1    =  1  :ô Contains value 10 or 0.
  42. Äà:
  43. Äê)ô Registers used with "OS_ReadPoint".
  44. Äô-x          =  0  :ô x screen co-ordinate.
  45. Äþ-y          =  1  :ô y screen co-ordinate.
  46. Å9colour     =  2  :ô Logical colour of pixel at (x,y).
  47. Å:
  48. Å,ô Other registers used in the programme.
  49. Å&=dot        =  3  :ô Contains value 1 if colour>threshold.
  50. Å0.line       =  7  :ô Vertical loop counter.
  51. Å:0horizpsn   =  8  :ô Horizontal loop counter.
  52. ÅDCpixel      =  9  :ô Vertical loop counter taking values 7 to 0.
  53. ÅN;points     =  3  :ô Number of printer strikes per line.
  54. ÅXFprintcode  = 11  :ô 8-bit code sent to the printer by "OS_WriteC".
  55. Åb:
  56. Ål:
  57. Åv:
  58. ŀ:
  59. Å⇩ã pass%=0 ¸ 3 ⇦ 3
  60. Å“
  61. P%=start%
  62. Åfi:
  63. Ũ[OPT pass%
  64. Ų:
  65. ż:
  66. ÅÆSTMFD (sp)!,{R3-R12,R14}
  67. ÅÐ:
  68. ÅÚ:
  69. ÅäCMP R0, #79
  70. ÅîBGT finish
  71. ÅøCMP R1, #255
  72. ÆBGT finish
  73. Æ CMP R2, #5
  74. ÆBLT finish
  75. Æ CMP R2, #7
  76. Æ*BGT finish
  77. Æ4CMP R2, #6
  78. Æ>BEQ finish
  79. ÆH:
  80. ÆR:
  81. Æ\STMFD (sp)!,{R0-R2}
  82. Æf:
  83. Æp:
  84. ÆzMOV xconvert,#4
  85. Æ☓MOV yconvert,#5
  86. ƉMOV left,#128
  87. Æ—MOV bottom,#129
  88. Æ¢MOV right,#130
  89. ƬMOV top,#131
  90. ƶMOV xorigin,#136
  91. ÆÀMOV yorigin,#137
  92. ÆÊMVN blockend,#0
  93. ÆÔSTMFD (sp)!,{top-blockend}
  94. ÆÞ
  95. MOV R0,sp
  96. Æè
  97. MOV R1,sp
  98. ÆòSWI "OS_ReadVduVariables"
  99. ÆüLDMFD (sp)!,{top-blockend}
  100. ÇMOV left,left,LSL xconvert
  101. ÇSUB left,left,xorigin
  102. ÇADD right,right,#1
  103. Ç$ MOV right,right,LSL xconvert
  104. Ç.SUB right,right,#1
  105. Ç8SUB right,right,xorigin
  106. ÇB"MOV bottom,bottom,LSL yconvert
  107. ÇLSUB bottom,bottom,yorigin
  108. ÇVADD top,top,#1
  109. Ç`MOV top,top,LSL yconvert
  110. ÇjSUB top,top,#1
  111. ÇtSUB top,top,yorigin
  112. Ç~MOV line, top
  113. Ç⇦:
  114. Ç‹:
  115. džMOV osbyte0, #3
  116. ǦMOV osbyte1, #10
  117. ǰSWI "OS_Byte"
  118. Ǻ:
  119. ÇÄ:
  120. ÇÎLDMFD (sp)!,{R0-R2}
  121. ÇØMOV xstep, #9
  122. ÇâSUB xstep, xstep, R2
  123. ÇìMOV xstep, xstep, LSR #1
  124. ÇöMOV threshold, R1
  125. ÈMOV margin, R0
  126. È
  127. :
  128. È:
  129. ÈMOV write, #27
  130. È(SWI "OS_WriteC"
  131. È2MOV write, #64
  132. È<SWI "OS_WriteC"
  133. ÈFMOV write, #27
  134. ÈPSWI "OS_WriteC"
  135. ÈZMOV write, #65
  136. ÈdSWI "OS_WriteC"
  137. ÈnMOV write, #8
  138. ÈxSWI "OS_WriteC"
  139. ÈŵMOV write, #27
  140. È…SWI "OS_WriteC"
  141. È„MOV write, #108
  142. È SWI "OS_WriteC"
  143. ȪMOV write, margin
  144. È´SWI "OS_WriteC"
  145. Ⱦ:
  146. ÈÈ:
  147. ÈÒMOV points, right
  148. ÈÜSUB points, points, left
  149. Èæ!MOV points, points, LSR xstep
  150. ÈðADD points, points, #1
  151. ÈúMOV xstep, xstep, LSL #1
  152. É:
  153. É:
  154. ÉSTMFD (sp)!,{points,left}
  155. É" .newline
  156. É,LDMFD (sp),{points,left}
  157. É6MOV write, #27
  158. É@SWI "OS_WriteC"
  159. ÉJMOV write, #42
  160. ÉTSWI "OS_WriteC"
  161. É^MOV write, #9
  162. ÉhSUB write, write, xstep
  163. ÉrSWI "OS_WriteC"
  164. É|MOV write, points
  165. ÉŷSWI "OS_WriteC"
  166. É‘MOV write, write, LSR #8
  167. ÉŒSWI "OS_WriteC"
  168. ɤ:
  169. É®:
  170. ɸMOV horizpsn, left
  171. ÉÂ.newstrike
  172. ÉÌMOV printcode, #0
  173. ÉÖMOV pixel, #7
  174. Éà:
  175. Éê:
  176. Éô
  177. .newpixel
  178. ÉþMOV x, horizpsn
  179. ÊMOV y, line
  180. ÊSUB y, y, #28
  181. ÊADD y, y, pixel, LSL #2
  182. Ê&SWI "OS_ReadPoint"
  183. Ê0CMP colour, threshold
  184. Ê:MOVGT dot, #1
  185. ÊD.ADDGT printcode, printcode, dot, LSL pixel
  186. ÊNSUBS pixel, pixel, #1
  187. ÊXBPL newpixel
  188. Êb:
  189. Êl:
  190. ÊvMOV write, printcode
  191. Ê€SWI "OS_WriteC"
  192. Ê⇩!ADD horizpsn, horizpsn, xstep
  193. Ê“CMP horizpsn, right
  194. ÊfiBLT newstrike
  195. ʨ:
  196. ʲ:
  197. ʼMOV write, #13
  198. ÊÆSWI "OS_WriteC"
  199. ÊÐMOV write, #10
  200. ÊÚSWI "OS_WriteC"
  201. ÊäSUB line, line, #32
  202. ÊîCMP line, bottom
  203. ÊøBGE newline
  204. Ë:
  205. Ë :
  206. ËMOV write, #12
  207. Ë SWI "OS_WriteC"
  208. Ë*MOV write, #27
  209. Ë4SWI "OS_WriteC"
  210. Ë>MOV write, #64
  211. ËHSWI "OS_WriteC"
  212. ËR:
  213. Ë\:
  214. ËfMOV osbyte0, #3
  215. ËpMOV osbyte1, #0
  216. ËzSWI "OS_Byte"
  217. Ë☓:
  218. ˉ:
  219. Ë—LDMFD (sp)!,{points,left}
  220. ˢ:
  221. ˬ:
  222. ˶ .finish
  223. ËÀLDMFD (sp)!,{R3-R12,R15}
  224. ËÊ:
  225. ËÔ
  226. EQUD 0
  227. ËÞ
  228. EQUD 0
  229. Ëè:
  230. ËòEQUS "ABACUS  TRAINING"
  231. ËüEQUD &0000000D
  232. Ì
  233. EQUD 0
  234. Ì
  235. EQUD 0
  236. Ì
  237. EQUD 0
  238. Ì$:
  239. Ì.]
  240. Ì8:
  241. ÌB:
  242. ÌL í pass%
  243. ÌV:
  244. Ì`:
  245. Ìj:
  246. Ìt end%=P%
  247. Ì~:
  248. Ì⇦:
  249. Ì‹:
  250. ̆    =end%
  251. ̦:
  252. ÿ